package com.situ.ymall.service;

import com.situ.ymall.entity.Order;

import java.util.List;

public interface OrderService {

    /*
    添加订单，需要返回订单的主键
    增加订单
     */
    Order add(Integer userId , Integer[] cartIds) throws Exception;

    Order getById(String orderId);

    int update(Order order);

    int pay(String id, String paypwd, Integer id1)throws Exception;

    List getByUserId(Integer id);

    /**
     * 清理无效订单
     */
    public int clean ();

    /**
     * 清除指定的订单
     * @param orderId
     * @return
     */
    int removeByOrderId(String orderId);
}
